.\" Copyright (C) 2001-2003  Daniel Kelly
.\" Copyright (C) 2009, 2011  Peter Pentchev
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License along
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.Dd March 1, 2011
.Dt PRIPS 1
.Os
.Sh NAME
.Nm prips
.Nd print the IP addresses in a given range
.Sh SYNOPSIS
.Nm
.Op Fl c
.Op Fl d Ar delim
.Op Fl e Ar exclude
.Op Fl f Ar format
.Op Fl i Ar incr
.Ar start
.Ar end
.Nm
.Op Fl c
.Op Fl d Ar delim
.Op Fl e Ar exclude
.Op Fl f Ar format
.Op Fl i Ar incr
.Ar CIDR-block
.Nm
.Fl h
.Sh DESCRIPTION
The
.Nm
tool can be used to print all of the IP addresses in a given range.
It can enhance tools that only work on one host at a time, e.g.
.Xr whois 1 .
.Pp
The
.Nm
tool accepts the following command-line options:
.Bl -tag -width indent
.It Fl c
Print the range in CIDR notation.
.It Fl d Ar delim
Set the delimiter to the character with ASCII code
.Ar delim
where 0 <=
.Ar delim
<= 255.
.It Fl e Ar <x.x.x,x.x>
Exclude ranges from the output.
.It Fl f Ar format
Set the format of addresses (hex, dec, or dot).
.It Fl h
Show summary of options.
.It Fl i Ar incr
Set the increment to 'x'.
.El
.Sh ENVIRONMENT
The
.Nm
tool's operation is not influenced by any environment variables.
.Sh FILES
The
.Nm
tool's operation is not influenced by any files.
.Sh EXAMPLES
Display all the addresses in a reserved subnet:
.Pp
.Dl prips 192.168.32.0 192.168.32.255
.Pp
The same, using CIDR notation:
.Pp
.Dl prips 192.168.32/24
.Pp
Display only the usable addresses in a class A reserved subnet using
a space instead of a newline for a delimiter:
.Pp
.Dl prips -d 32 10.0.0.1 10.255.255.255
.Pp
Display every fourth address in a weird block:
.Pp
.Dl prips -i 4 192.168.32.7 192.168.33.5
.Pp
Determine the smallest CIDR block containing two addresses:
.Pp
.Dl prips -c 192.168.32.5 192.168.32.11
.Pp
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr ipsc 1 ,
.Xr gipsc 1
.Sh STANDARDS
No standards were harmed in the writing of the
.Nm
tool.
.Sh HISTORY
The
.Nm
tool was originally written by
.An Daniel Kelly
and later adopted by
.An Peter Pentchev .
This manual page was originally written by
.An Juan Alvarez
for the Debian GNU/Linux system and later added to the
.Nm
distribution and converted to mdoc format by
.An Peter Pentchev .
.Sh AUTHORS
.An Daniel Kelly
.Aq dan@vertekcorp.com
.An Juan Alvarez
.Aq jalvarez@fluidsignal.com
.An Peter Pentchev
.Aq roam@ringlet.net
.Sh BUGS
Please report any bugs in the
.Nm
tool to its current maintainer,
.An Peter Pentchev .
